<?php
namespace app\admin\model;
use think\Model;
use think\Db;
class Department extends Model
{
    protected $table = 'tp_department';

    function mainAllList(){
        $where[] = ['is_del','=',0];
        $list = $this->where($where)->order('sort_order')->select();

        return $list;
    }
}